<layout name="layout" />
<div class="row">
<div id="content" class="col-md-12">
<?php //var_dump($list) ?>
	<ul class="nav nav-tabs" id="myTab">
	  <li class="active"><a href="#groupList" data-toggle="tab">角色列表</a></li>
	  <li class=""><a href="#groupAdd" data-toggle="tab">添加角色</a></li>
	</ul>
	<!-- Tab panes -->
	<div class="tab-content">
	  <div class="tab-pane fade active in" id="groupList">
	  	<table class="table table-hover table-bordered table-condensed">
	  		<thead>
		  		<tr>
		  			<td>序号</td>
		  			<td>角色名称</td>
		  			<td>角色描述</td>
		  			<td>状态</td>
		  			<td>操作</td>
		  		</tr>
	  		</thead>
	  		<tbody>
	  		<foreach name="list" item="v">
	  		<tr>
  				<td>{$v.id}</td>
  				<td>{$v.title}</td>
  				<td>{$v.describe}</td>
  				<td>
					<if condition="$v.status eq 1">
						<span class="label label-success">正常</span>
					<else/>
						<span class="label label-danger">禁用</span>
					</if>
				</td>
				<td>
					<div class="btn-group btn-group-xs">
						 <a class="btn btn-primary" href="__CONTROLLER__/ruleList?id={$v.id}&title={$v.title}">权限设置</a> 
						 <a class="btn btn-info" href="__MODULE__/Member/index?gid={$v.id}">成员管理</a> 
						 <a class="btn btn-warning" href="__CONTROLLER__/editGroup?id={$v.id}">修改</a> 
						 <a class="btn btn-danger" href="__CONTROLLER__/delGroup?id={$v.id}">删除</a>
					</div>
				</td>
	  		</tr>
			</foreach>
	  		</tbody>
	  	</table>
	  	<ul class="pagination">{$page}</ul>
	  </div>
	  <div class="tab-pane fade" id="groupAdd">
	  		<form class="form-horizontal" action="__CONTROLLER__/addGroup" method="post">
				<div class="form-group">
					<label for="groupName" class="col-sm-2 control-label">角色名称:</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="角色名称" name="title" id="groupName">
					</div>
					<label class="col-sm-2 control-label"></label>
				</div>						

				<div class="form-group">
					<label for="describe" class="col-sm-2 control-label">角色描述:</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="角色描述" name="describe" id="describe">
					</div>
					<label class="col-sm-2 control-label"></label>
				</div>						

				<div class="form-group">
					<label class="col-sm-2 control-label">是否启用:</label>
					<div class="btn-group col-sm-5" data-toggle="buttons">
						<label class="btn btn-primary">
							<input type="radio" name="status" id="status" checked="checked" value="1">启用
						</label>

						<label class="btn btn-danger">
							<input type="radio" name="status" id="status" value="0">禁用
						</label>
					</div>
					<label class="col-sm-2 control-label"></label>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-5">
						<button type="submit" class="btn btn-success btn-add">添加</button>
					</div>
				</div>
			</form>
	  </div>
	</div>
</div>
</div>